package com.wbao.dianniu.utils;

import android.app.Activity;
import android.content.Context;

/**
 * 封装当前界面的Activity
 * Created by liyanfang on 2016/5/30.
 */
public class AppUtil {


    private static Activity activity;

    private static Context sContext;

    /**
     * 获得当前的activity
     * @return
     */
    public static Activity getActivity(){
        return activity;
    }

    /**
     * 添加activity
     * @param act
     */
    public static void setActivity(Activity act){
        activity=act;
    }

    /**
     * 获得当前的Context
     * @return
     */
    public static Context getContext(){
        return sContext;
    }

    /**
     * 添加Context
     */
    public static void setContext(Context context){
        sContext = context;
    }
}
